package com.asset.salesforce.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.asset.salesforce.dao.DeletedAccountDaoImpl;
import com.asset.salesforce.domain.DeletedAccount;


@Service
@Transactional(readOnly=true)
public class DeletedAccountService {
	

	@Autowired 
	private DeletedAccountDaoImpl deletedAccountDaoImpl;
	
	@Transactional(readOnly=false)
	public DeletedAccount addDeletedAccount(DeletedAccount deletedAccount) {
		deletedAccountDaoImpl.add(deletedAccount);
		 return deletedAccount;
	}
	public DeletedAccount getById(DeletedAccount deletedAccount) {
		return deletedAccountDaoImpl.getById(deletedAccount.getId(), new DeletedAccount());
	}
	
	public List<DeletedAccount> getAll() {
		return deletedAccountDaoImpl.getAll(new DeletedAccount());
	}

}
